let Host = 'http://cut_api.gameyeah.net/'
// let Host = 'http://cut_api.yugaga.com/'
//Host = 'http://api.cut.com/'
Host = 'http://course.gameyeah.net/cross_origin/'

let Config = {
	isCourse: false, //是否课程模块
	show_err: false, //接口是否提示异常信息
	// update_server: 'http://cut_image.yugaga.com/update/', //检查更新地址
	update_server: 'http://cut_image.gameyeah.net/update/', //检查更新地址
	websocket_server: 'ws://ws.cut.com/ws',
	//不需要验证登录状态
	no_authed_pages: [
		'pages/public/login',
		'pages/course/index',
		'pages/course/detail'
	],
	url: {
		'product.carousels': Host + 'api/product/carousels',
		'product.categories': Host + 'api/product/categories',
		//code
		'code.pcaptcha': Host + 'api/code/pcaptcha',
		//register login
		'user.register': Host + 'api/user/register',
		'user.login': Host + 'api/authorizations',
		'auth.refresh': Host + 'api/authorizations/current',
		'user.info': Host + 'api/user',
		'user.update': Host + 'api/user/update',
		'user.address': Host + 'api/user/address',
		'user.address.add': Host + 'api/user/address/add',
		'user.head.upload': Host + 'api/user/head/upload',
		//商品
		'product.index': Host + 'api/product/index',
		'product.detail': Host + 'api/product/detail',
		'product.fetch_coupon': Host + 'api/product/fetch_coupon',         // 领取优惠券
		'product.my_coupon_number': Host + 'api/product/my_coupon_number', // 我的优惠券总数
		'product.get_my_coupons': Host + 'api/product/get_my_coupons',     // 获取我的优惠券
		'product.use_my_coupon': Host + 'api/product/use_my_coupon',       // 确认使用优惠券
		//商铺
		'shop.detail': Host + 'api/shop/detail',
		'shop.fetch_coupon': Host + 'api/shop/fetch_coupon',         // 领取优惠券
		
		//通知
		'notice.list': Host + 'api/notice/list',
		'notice.detail': Host + 'api/notice/detail',
		'notice.readed': Host + 'api/notice/readed',
		
		//新闻
		'news.list': Host + 'api/news/list',
		'news.detail': Host + 'api/news/detail',
		'news.readed': Host + 'api/news/readed',
		
		'city.get_all': Host + 'api/city/get_all',
		
		//index
		'index.recommend': Host + 'api/index/recommends',
		
		//课程
		'course.index': Host + 'api/course/index',
		'course.detail': Host + 'api/course/detail',
		'code.dxcaptcha': Host + 'api/code/dxcaptcha',
		'cuser.register': Host + 'api/cuser/register',
		'cuser.login': Host + 'api/cuser/login',
		'cuser.info': Host + 'api/cuser',
		//添加报名
		'courseuser.add': Host + 'api/courseuser/add',
		'courseuser.list': Host + 'api/courseuser/list',
		'courseuser.learn': Host + 'api/courseuser/learn',
		'pay.xorpay_add': Host + 'api/pay/xorpay_add',
		'pay.ali_add': Host + 'api/pay/ali_add',
		
		//获取
		'common.suffix' : Host + 'api/',
	}
}

var lang = uni.getStorageSync('lang') ? uni.getStorageSync('lang') : 'zh-CN';
console.log('lang ' + lang)

var common_text = {
	'zh-CN': {
		login_expired: '登录已过期，请重新登录',
		request_err: '报错',
		year_txt: '年',
		date_UNITS: {
			'年': 31557600000,
			'月': 2629800000,
			'天': 86400000,
			'小时': 3600000,
			'分钟': 60000,
			'秒': 1000
		},
		pre_time: '前',
		now_time: '刚刚',
	},
	'en-US': {
		login_expired: '登录已过期，请重新登录',
		request_err: 'error',
		year_txt: 'year',
		date_UNITS: {
			'year': 31557600000,
			'month': 2629800000,
			'day': 86400000,
			'hour': 3600000,
			'min': 60000,
			'sec': 1000
		},
		pre_time: 'pre',
		now_time: 'now',
	}
}
Config.common_text = common_text[lang];
// console.log('lang: '+lang, Config.common_text);
export default Config